load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "migration-create-mutator.go",
        "namespace-limits.go",
        "preset.go",
        "utils.go",
        "vm-mutator.go",
        "vmi-mutator.go",
    ],
    importpath = "kubevirt.io/kubevirt/pkg/virt-api/webhooks/mutating-webhook/mutators",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/util/webhooks:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/k8s.io/api/admission/v1beta1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/errors:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "migration-create-mutator_test.go",
        "mutators_suite_test.go",
        "namespace-limits_test.go",
        "preset_test.go",
        "vm-mutator_test.go",
        "vmi-mutator_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//pkg/testutils:go_default_library",
        "//pkg/virt-api/webhooks:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-operator/creation/rbac:go_default_library",
        "//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//vendor/github.com/onsi/ginkgo:go_default_library",
        "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/k8s.io/api/admission/v1beta1:go_default_library",
        "//vendor/k8s.io/api/authentication/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/client-go/tools/cache:go_default_library",
    ],
)
